package com.example.business_oa.service;

import com.example.comment_oa.dubbo.RepairRecordServiceDubbo;
import com.example.comment_oa.pojos.RepairRecord;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;

import java.util.List;

/**
 * @Description:物品更换审批
 * @Author:陈旭良
 * @Documents_And_Settings:liang
 * @Date:2023-02-08 20:19
 * @Entry_Name:my_springcloud_project01cangku
 */
public class RepairRecordService {

    @DubboReference(version = "1.0.0")
    RepairRecordServiceDubbo repairRecordServiceDubbo;

    //查询更换未审批
    @GlobalTransactional(timeoutMills = 300000)
    public List<RepairRecord> conAllRepair(){
        return repairRecordServiceDubbo.conAllRepair();
    }
    //修改物品审批
    @GlobalTransactional(timeoutMills = 300000)
    public boolean upRepair(RepairRecord repairRecord){
        return repairRecordServiceDubbo.upRepair(repairRecord);
    }
}
